import { defineStore } from 'pinia'
import { ref } from 'vue'
import { RoleMenu,adminData } from '../apis/role'

export const usePermissStore =  defineStore('permiss',()=>{
    const roleList = ref([1,2,4,5])
    const getRole = async ()=>{
        const res = await RoleMenu()
        if(res) roleList.value = res.data.data;
        return roleList.value
    }

    return {
        roleList,
        getRole,
    }
},{
    persist:true,
})